package com.llt.ai.config;

import com.alibaba.cloud.ai.dashscope.embedding.DashScopeEmbeddingModel;
import org.springframework.ai.vectorstore.SimpleVectorStore;
import org.springframework.ai.vectorstore.VectorStore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * 向量存储配置类：将嵌入模型与向量存储整合，用于知识检索（RAG）
 * @Author: llt
 * @Date: 2025-08-04 下午1:28
 */
@Configuration
public class RagConfig {
    @Bean
    public VectorStore vectorStore(DashScopeEmbeddingModel embeddingModel) {
        return SimpleVectorStore.builder(embeddingModel).build();
    }
}
